﻿using Abp.Domain.Repositories;
using shenghua.Common.WordNodes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Basics.Areas
{
    public class AreaManager: WordNodeManager<Area>
    {
        public AreaManager(IRepository<Area> areaRepository)
            :base(areaRepository)
        {
        }

        public override async Task<Area> Add(Area word)
        {
            word.Name = word.DisplayName;
            await base.Add(word);
            return word;
        }

        public override async Task<Area> Update(Area word)
        {
            word.Name = word.DisplayName;
            await base.Update(word);
            return word;
        }
    }
}
